Skip to main content

Get Mail Messages

AutomatR.Outlook.GetMailMessage

The "Get Mail Messages" activity in AutomatR is part of the Outlook activities package, allowing the retrieval of email messages from Microsoft Outlook. This activity streamlines the process of fetching and filtering emails based on specified criteria, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
Account NameThe name of the Outlook account from which to retrieve mail messages.
Body ContainingSpecifies the body text that the retrieved mail messages should contain.
Default FolderThe default Outlook folder from which to retrieve mail messages. It is a required argument.
End DatePlease enter the end date to assist in filtering the emails (example: 2023-07-26 17:00 or 2023-07-26).
Folder NameThe name of the Outlook folder from which to retrieve mail messages.
FromSpecifies the email address or name of the sender of the retrieved mail messages.
Get Only AttachmentsRetrieve mail messages that have attachments.
Get Only UnreadRetrieve only unread mail messages.
Has AttachmentsThe maximum number of mail messages to retrieve.
Mark As Read After GetMark retrieved mail messages as read.
Number Of MailsThe name of the Outlook folder from which to retrieve mail messages.
SenderSpecifies the email address or name of the sender of the retrieved mail messages.
Start DatePlease enter the start date to assist in filtering the emails (example: 2023-07-26 01:00 or 2023-07-26).
Subject ContainingSpecifies the subject text that the retrieved mail messages should contain.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project.
Optional
DelayEnter the wait time in seconds (Example: 5 seconds, i.e., 5) to start the activity.
Output
ResultA list of MailItem objects representing the retrieved mail messages from Outlook.

How to use:

  1. Drag and drop the "Get Mail Messages" activity onto the workflow.
  2. Configure the properties by specifying the criteria for retrieving mail messages.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to fetch the specified mail messages from Outlook.

Example:

Consider an example where the "Get Mail Messages" activity is used to retrieve unread emails with attachments from the default inbox:

Get Mail Messages:
Display Name: "Fetch Unread Emails with Attachments"
Default Folder: Inbox
Get Only Unread: true
Get Only Attachments: true
Result: retrievedEmails

In this example, the activity retrieves unread emails with attachments from the default inbox, and the result is stored in the retrievedEmails list for further processing in the workflow.